<?php
namespace app\index\controller;
use think\Db;
class Index
{
    public function index()
    {
        $res=Db::name('test')->select();
        echo json_encode($res);
    }
    public function inster()
    {
       $res= Db::name("test")->insert(array('name'=>'lisi'));
       return $res;
    }
    public function info()
    {
        $res=  \think\Cache::store('redis')->set('name',['name'=>'man']);
        return  $res;
    }
    public function phpinfo()
    {
        echo phpinfo();
    }
}
